##############################################################
#Figure F1: Hurricane Proximity and Religiosity
##############################################################

religion <- read.dta13("./temp/figf1data.dta")

newdf <- religion %>% 
  gather(variable, value, -var)%>%
  spread(var, value)

newdf$id <- c(5,4,3,2,6,1)

ggplot() + 
  geom_pointrange(data=newdf, mapping=aes(x=id, y=coef, ymin=ci_upper, 
                                          ymax=ci_lower), color="black", size=1.2, lwd=1.2, fatten=2, fill="white", shape=21) +
  ylim(-.5,.5) +
  scale_x_discrete(limit=c("1", "2", "3", "4", "5", "6"), labels= c("[500,30)", "[400,30)", "[300,30)", "[200,30)", "[100,30)", "[50,30)")) + 
  xlab("Distance Band")  + ylab("Estimate on Religiosity") +
  geom_hline(yintercept=0, col="black", lwd=.5, lty="dashed", alpha=.6)  + 
  theme_bw() + theme(panel.grid.major.y = element_blank(),
                     panel.grid.minor.y = element_blank())


ggsave("./figures/figf1.pdf")
